package com.ttx.pattern.example.visitor.after;

/**
 * @author TimFruit
 * @date 19-6-2 上午1:29
 */
public class ConcreteVisitor1 implements Visitor {

    @Override
    public void visit(Element element) {
        if(element instanceof ConcreteElement){
            ConcreteElement concreteElement=(ConcreteElement) element;

            // 只关注 key
            System.out.println("concreteVisitor1 访问keySet: "+ concreteElement.getKeySet());


        }else {
            throw new RuntimeException("具体元素不能被识别访问");
        }

    }
}
